package com.chenjun.datastructure;

import java.util.LinkedList;

/**
 * 【队列】数据结构
 * 
 * @author Administrator
 * 
 */
public class Queue<T>
{
	private LinkedList<T> queue = new LinkedList<T>();

	//取队头元素
	public T getQueueHead()
	{
		return queue.getFirst();
	}
	
	public void inQueue(T t)
	{
		queue.add(t);
	}

	public boolean outQueue(T t)
	{
		return queue.remove(t);
	}

	public boolean isEmpty()
	{
		return queue.isEmpty();
	}

	public boolean contians(T t)
	{
		return queue.contains(t);
	}
	
	public int size()
	{
		return queue.size();
	}

}
